//
//  WTSquareHeadView.m
//  OneDay
//
//  Created by lanou on 16/1/22.
//  Copyright © 2016年 小明. All rights reserved.
//

#import "WTSquareHeadView.h"

@implementation WTSquareHeadView

- (instancetype)initWithFrame:(CGRect)frame
{

    self = [super initWithFrame:frame];
    if (self) {
        
        
        _leftButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _leftButton.frame = CGRectMake(10 * kRelativeLength_X, (64 - 30 * kRelativelength_Y) / 2, 30 * kRelativeLength_X, 30 * kRelativelength_Y);
        [self addSubview:_leftButton];
        
        
        _rightButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _rightButton.frame = CGRectMake( kScreenWidth -  60 * kRelativeLength_X,_leftButton.top, 50 * kRelativeLength_X, 30 * kRelativelength_Y);
        [self addSubview:_rightButton];
        
        
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(_leftButton.right + 10 * kRelativeLength_X, _leftButton.top, _rightButton.left - _leftButton.right - 20 *kRelativeLength_X, _leftButton.height)];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.textColor = [UIColor whiteColor];
        [self addSubview:_titleLabel];
        
    }
    return self;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
